* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Search Box */
.search-box {
    margin-bottom: 30px;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.tab-link {
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.tab-link:hover {
    color: var(--primary-color);
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Notes Grid */
.notas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.nota-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nota-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.nota-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.nota-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.nota-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Images Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.image-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.image-link {
    text-decoration: none;
    color: var(--text-color);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.image-thumb {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover .image-thumb img {
    transform: scale(1.05);
}

.image-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    text-align: center;
}

.image-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.btn-download-small {
    text-decoration: none;
    font-size: 1.2rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-download-small:hover {
    background: var(--bg-color);
    transform: scale(1.1);
}

/* Image Viewer */
.image-viewer {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.image-viewer h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--border-color);
}

.image-container {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.image-container img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.image-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 12px;
}

.btn-download {
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-download:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.image-info {
    color: var(--text-secondary);
    font-weight: 500;
}

.no-files code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary-color);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

/* Article Content */
.nota-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.nota-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--border-color);
}

.text-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.text-content h1 {
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.text-content h2 {
    font-size: 1.5rem;
    margin-top: 25px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.text-content h3 {
    font-size: 1.3rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.text-content p {
    margin-bottom: 15px;
}

.text-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.text-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.text-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.text-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.text-content li {
    margin-bottom: 8px;
}

/* Messages */
.error,
.no-files {
    background: #fee;
    color: #c33;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.no-files {
    background: #f0f9ff;
    color: var(--text-secondary);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .notas-grid,
    .images-grid {
        grid-template-columns: 1fr;
    }

    .nota-content,
    .image-viewer {
        padding: 25px;
    }

    .nota-content h2,
    .image-viewer h2 {
        font-size: 1.5rem;
    }

    .container {
        padding: 15px;
    }

    .image-container {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 30px 15px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .tabs {
        flex-direction: column;
        gap: 5px;
    }

    .tab-link {
        text-align: center;
    }

    .image-actions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}